From a75c038e09db83277bedae8783dc698a4e934078 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 28 Mar 2021 10:59:55 -0400 Subject: [PATCH] textview: Tweak render nodes Arrange for the contents to be in a single transform node that is updated as we scroll. This makes the job of the render node differ a lot easier, since it does not have to compare to big containers one-by-one. --- gtk/gtktextlayout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index b90e6d12f1..05d9fa9b2a 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -4160,6 +4160,9 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, if (line_list == NULL) return; /* nothing on the screen */ + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (0, offset_y)); + offset_y = 0; + cursor_snapshot = gtk_snapshot_new (); crenderer = gsk_pango_renderer_acquire (); -- 2.30.2